<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小时分钟秒转化</title>
    <style>

    </style>
</head>

<body>
<script>
    var num=67890;
    var h=Math.floor(num/3600);
    var m=Math.floor(num%3600/60);
    var s=num%60;
    function addZ(n){
        return n<10?"0"+n:""+n;
    }
    var str=addZ(h)+":"+addZ(m)+":"+addZ(s);
    console.log(str);
</script>
</body>
</html>